<template>
	<view class="page">
		<view class="mianBox">
			<view class="cu-bar text-white" style="background: #FFFFFF;">
				<view class="action">
					
				</view>
				<view class="content" style="color: #000000;">
					订单
				</view>
				<view class="action">
					
					
				</view>
			</view>
			<view class="card radius bg-gradual-blue">
				<view class="text-1 lg">昨日收益总额 (元)</view>
				<view class="text-sl w-mt-10">
					<text>{{info.yesterday_amount || 0}}</text>
					<view class="text-xs">
						<text class="margin-right text-1 ">
							<text class="w-mr-15">实时到账</text>
							{{info.yesterday_reality_amount || 0}}
						</text>
						<text class=" margin-lr-xl text-1"><text class="w-mr-15">手续费</text>{{info.yesterday_cheques || 0}}</text>
					</view>
				</view>
			</view>
			<view class="cu-bar bg-gray solid-bottom margin-top">
				<view class="action" style="color: #888888;">
					<text>今日交易汇总</text>
			
				</view>
			</view>
			<!-- 3 -->
			<view class="cu-list menu">
				<view class="cu-item arrow" @tap="go('/pages/shop/tradeRecord?type=1')">
					<view class="content">
						<image src="/static/icon/jaioyi1.png" class="png" mode="aspectFit" style="left: -45upx;"></image>
						<text class="text-black text-df" style="margin-left: -38upx;">扫码收款</text>
						<!-- <text class=" margin-lr-xl">交易0笔</text> -->
					</view>
					<!-- --------------------------------jiaoyi------------------------ -->
					<view class="jiaoyi">
						<view class="text-bold text-1">￥{{info.today_amount}}</view>
						<text class="text-grey text-1">交易{{info.today_order_num}}笔</text>
					</view>
			
					<!-- -------------------------------------------------------- -->
				</view>
				<view class="cu-item arrow" @tap="go('/pages/shop/tradeRecord?type=2')">
					<view class="content">
						<image src="/static/icon/jaioyi2.png" class="png" mode="aspectFit" style="left: -45upx;"></image>
						<text class="text-black text-df" style="margin-left: -38upx;">刷卡收款</text>
					</view>
					<!-- --------------------------------jiaoyi------------------------ -->
					<view class="jiaoyi">
						<view class="text-bold text-1">￥{{info.today_card_amount}}</view>
						<text class="text-grey text-1">交易{{info.today_card_order_num}}笔</text>
					</view>
			
					<!-- -------------------------------------------------------- -->
				</view>
				<view class="cu-item arrow" @tap="gotopayback">
					<button class="cu-btn content">
						<image src="/static/icon/jaioyi3.png" class="png" mode="aspectFit" style="left: -45upx;"></image>
						<text class="text-black text-df" style="margin-left: -38upx;">交易退款</text>
					</button>
					<!-- --------------------------------jiaoyi------------------------ -->
					<view class="jiaoyi">
						<view class="text-bold text-1">￥0.00</view>
						<text class="text-grey text-1">交易0笔</text>
					</view>
				</view>
			</view>
			<view class="cu-bar bg-gray solid-bottom">
				<view class="action" style="color: #888888;">
					<text>结算汇总</text>
				</view>
			</view>
			<view class="cu-list menu margin-bottom" style="border-bottom: 1px solid #efefef;">
				<view class="cu-item arrow" @tap="go('/pages/shop/total?TabCur=0')">
					<view class="content">
						<image src="/static/icon/jaioyi4.png" class="png" mode="aspectFit" style="left: -45rpx;"></image>
						<text class="text-black text-lg" style="font-weight: 600;margin-left: -38rpx;">近一周结算</text>
					</view>
					<!-- --------------------------------jiaoyi------------------------ -->
					<view class="jiaoyi">
						<view class="text-bold text-1">￥{{info.week_amount}}</view>
						<text class="text-grey text-1" style="margin-bottom: 300rpx">交易{{info.week_order_num}}笔</text>
					</view>
			
					<!-- -------------------------------------------------------- -->
				</view>
				<view class="cu-item arrow" @tap="go('/pages/shop/total?TabCur=1')">
					<view class="content">
						<image src="/static/icon/jaioyi4.png" class="png" mode="aspectFit" style="left: -45rpx;"></image>
						<text class="text-black text-lg" style="font-weight: 600;margin-left: -38rpx;">近一月结算</text>
					</view>
					<!-- --------------------------------jiaoyi------------------------ -->
					<view class="jiaoyi">
						<view class="text-bold text-1">￥{{info.one_month_amount}}</view>
						<text class="text-grey text-1">交易{{info.one_month_order_num}}笔</text>
					</view>
			
					<!-- -------------------------------------------------------- -->
				</view>
				<view class="cu-item arrow"  @tap="go('/pages/shop/total?TabCur=2')">
					<button class="cu-btn content" open-type="contact">
						<image src="/static/icon/jaioyi4.png" class="png" mode="aspectFit" style="left: -45rpx;"></image>
						<text class="text-black text-lg" style="font-weight: 600;margin-left: -38rpx;">近三月结算</text>
					</button>
					<!-- --------------------------------jiaoyi------------------------ -->
					<view class="jiaoyi">
						<view class="text-bold text-1">￥{{info.three_month_amount}}</view>
						<text class="text-grey text-1">交易{{info.three_month_order_num}}笔</text>
					</view>
				</view>
				
			</view>
		</view>
	</view>
</template>

<script>

export default {
	data() {
		return {
			info: {}
		};
	},
	onShow() {
		this.getMoney()
	},
	onReady() {
		
	},
	methods: {
		async getMoney () {
			this.list = []
			let params = {
				
			}
			const res = await this.$API({url: '/api/index/settlement_summary',method:"GET", data: params})
			if (res.code === 1) {
				this.info = res.data
			}
		},
		go(url) {
			uni.navigateTo({
				url: url
			})
		},
		gotopayback() {
			uni.navigateTo({
				url: "/pages/shop/payback"
			})
		},
	}
};
</script>

<style scoped lang="scss">
page {
	padding-bottom: 50rpx;
	.cu-list.grid > .cu-item:after {
		border: none;
	}
	.cu-list.menu-avatar>.cu-item .content {
		width: calc(100% - 46px - 30px - 60px);
	}
}
.mianBox {
	background: #FFFFFF;
}
.card {
	margin: 30upx;
	padding: 65upx;
	border-radius: 15upx;
	font-size: 40upx;
	letter-spacing: 3upx;
}
.cu-list.menu>.cu-item {
	padding: 0 40px;
	min-height: 65px;
}
.cu-list.menu>.cu-item .content>.png {
	width: 80rpx;
	height: 80rpx;
}
</style>
